﻿@{
    ViewBag.Title = "Add New Word";
}

<h2>@ViewBag.Title.</h2>

<hr />

<form role="form" name="newWordForm" autocomplete="off" class="form-horizontal" ng-controller="Word as wvm">
    <div class="form-group">
        <label for="frnWord" class="col-md-2 control-label">Foreign Word:</label>
        <div class="col-md-10">
            <input type="text" class="form-control" id="frnWord" ng-model="wvm.word.ForeignWord" required>
        </div>
    </div>

    <div class="form-group">
        <label for="transcription" class="col-md-2 control-label">Transcription:</label>
        <div class="col-md-10">
            <input type="text" class="form-control" id="transcription" ng-model="wvm.word.Transcription" required>
        </div>
    </div>

    <div class="form-group">
        <label for="translation" class="col-md-2 control-label">Translation:</label>
        <div class="col-md-10">
            <input type="text" class="form-control" id="translation" ng-model="wvm.word.Translation" required>
        </div>
    </div>

    <div class="form-group">
        <label for="description" class="col-md-2 control-label">Description:</label>
        <div class="col-md-10">
            <textarea type="text" class="form-control" id="description" ng-model="wvm.word.Description"></textarea>
        </div>
    </div>

    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <button type="submit" class="btn btn-default" ng-disabled="newWordForm.$invalid" ng-click="wvm.addWord(newWordForm)">Add</button>
            <button type="button" class="btn btn-default" ng-click="wvm.clear()">Clear</button>
        </div>
    </div>
</form>